Add support for netif frontends which don't support checksum offload.
authorssmith@weybridge.uk.xensource.com <ssmith@weybridge.uk.xensource.com>
Mon, 4 Sep 2006 15:38:24 +0000 (16:38 +0100)
committerssmith@weybridge.uk.xensource.com <ssmith@weybridge.uk.xensource.com>
Mon, 4 Sep 2006 15:38:24 +0000 (16:38 +0100)
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c

index a8b19a65be62e00abb704bb57d60758dfa1dff2a..6da614fc0c53dcc39c75e4a2c5720c43f1b213a0 100644 (file)
@@ -427,6 +427,14 @@ static int connect_rings(struct backend_info *be)
                be->netif->dev->features |= NETIF_F_TSO;
        }
 
+       if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-no-csum-offload",
+                        "%d", &val) < 0)
+               val = 0;
+       if (val) {
+               be->netif->features &= ~NETIF_F_IP_CSUM;
+               be->netif->dev->features &= ~NETIF_F_IP_CSUM;
+       }
+
        /* Map the shared frame, irq etc. */
        err = netif_map(be->netif, tx_ring_ref, rx_ring_ref, evtchn);
        if (err) {